package cn.net.ait.hr.entity;

import java.util.Date;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.guiceside.persistence.entity.IdEntity;
import org.guiceside.persistence.entity.Tracker;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;

import cn.net.ait.hr.entity.HrDuty;

/**
 * @author yuxi
 * @since JDK1.5
 * @version 1.0 2008-10-13
 * 
 **/
@Entity
@Table(name = "HR_EMPLOYEE")
public class HrEmployee extends IdEntity implements Tracker {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private Long id;

	private String empId;

	private Date empEntryDate;


	private String empNameZh;

	private String empNameKo;

	private String empNameEn;

	private String empNamePy;


	
	private Date empBecomeDate;

	private Date empDimissionDate;


	private String cardId;

	private Date created;

	private String createdBy;

	private Date updated;

	private String updatedBy;

	private String useYn;

	private HrDuty dutyId;
	
	

	@Column(name = "CREATED", updatable = false)
	public Date getCreated() {

		return created;
	}

	@Column(name = "CREATEDBY", updatable = false)
	public String getCreatedBy() {

		return createdBy;
	}

	@Column(name = "UPDATED")
	public Date getUpdated() {

		return updated;
	}

	@Column(name = "UPDATEDBY")
	public String getUpdatedBy() {

		return updatedBy;
	}

	public void setCreated(Date created) {
		this.created = created;

	}

	public void setCreatedBy(String createdBy) {
		this.createdBy = createdBy;

	}

	public void setUpdated(Date updated) {
		this.updated = updated;

	}

	public void setUpdatedBy(String updatedBy) {
		this.updatedBy = updatedBy;

	}

	@Column(name = "USE_YN")
	public String getUseYn() {
		return useYn;
	}

	public void setUseYn(String useYn) {
		this.useYn = useYn;
	}

	@Id
	@GeneratedValue(generator = "SEQ_HR_EMPLOYEE")
	@GenericGenerator(name = "SEQ_HR_EMPLOYEE", strategy = "seqhilo", parameters = { @Parameter(name = "sequence", value = "SEQ_HR_EMPLOYEE") })
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Column(name = "EMP_NAME_ZH")
	public String getEmpNameZh() {
		return empNameZh;
	}

	public void setEmpNameZh(String empNameZh) {
		this.empNameZh = empNameZh;
	}



	@Column(name = "EMP_ENTRY_DATE")
	public Date getEmpEntryDate() {
		return empEntryDate;
	}

	public void setEmpEntryDate(Date empEntryDate) {
		this.empEntryDate = empEntryDate;
	}

	@Column(name = "EMP_ID")
	public String getEmpId() {
		return empId;
	}

	public void setEmpId(String empId) {
		this.empId = empId;
	}

	@Column(name = "EMP_NAME_EN")
	public String getEmpNameEn() {
		return empNameEn;
	}

	public void setEmpNameEn(String empNameEn) {
		this.empNameEn = empNameEn;
	}

	@Column(name = "EMP_NAME_KO")
	public String getEmpNameKo() {
		return empNameKo;
	}

	public void setEmpNameKo(String empNameKo) {
		this.empNameKo = empNameKo;
	}

	@Column(name = "EMP_NAME_PY")
	public String getEmpNamePy() {
		return empNamePy;
	}

	public void setEmpNamePy(String empNamePy) {
		this.empNamePy = empNamePy;
	}



	@Column(name = "CARD_ID")
	public String getCardId() {
		return cardId;
	}

	public void setCardId(String cardId) {
		this.cardId = cardId;
	}

	@Column(name = "EMP_BECOME_DATE")
	public Date getEmpBecomeDate() {
		return empBecomeDate;
	}

	public void setEmpBecomeDate(Date empBecomeDate) {
		this.empBecomeDate = empBecomeDate;
	}

	@Column(name = "EMP_DIMISSION_DATE")
	public Date getEmpDimissionDate() {
		return empDimissionDate;
	}

	public void setEmpDimissionDate(Date empDimissionDate) {
		this.empDimissionDate = empDimissionDate;
	}


	@ManyToOne
	@JoinColumn(name = "DUTY_ID")
	public HrDuty getDutyId() {
		return dutyId;
	}

	public void setDutyId(HrDuty dutyId) {
		this.dutyId = dutyId;
	}



}
